#!/usr/bin/perl -w

use Test::More tests =>  2;
# =============================================================
# Cargamos el modulo
# ==============================================================
use_ok('Bench::Test');

# =============================================================
# Establecemos los parametros adecuados
# =============================================================
SKIP: {
   my $host = $ENV{BENCH_TEST_REMOTE_HOST}
      or skip('because you must set enviroment var BENCH_TEST_REMOTE_HOST', 1);

   my $bt = Bench::Test->new(
      config_file => \*DATA,
   );

   ok($bt->make_tests, 'Executing "Bench::Test::make_test" using remote machine');
}

__DATA__

@TESTS = (
        t01 =>   '100000',
        t02 =>  '1000000',
        t03 =>  '2000000',
        t04 =>  '5000000',
);

@TABLE         = (
     SIZE  => 'Seed:\s*\d+\s*size:\s*(.*)\n',
     TIME  => 'Time:\s*(.*)\n',
     ORDER => sub {
                 my $output = shift;
                 $output =~ /(.*?)\s+sorting\n/;
                 return 'Dec' if ($1 eq 'Reverse');
                 return 'Asc';
              }
   );

@VISUAL = qw(TEST NAME SIZE TIME ORDER);

@UNIQUE = qw(SIZE ORDER);

sub Bench::Test::Entry::is_OK {
   my $self = shift;
   return 1;
}

%EXPERIMENTS = ( 
   'LOCAL' => Bench::Test::Local->new  (
                 WORKDIR   => 'examples/qs',
                 EXECUTABLE => './qs',
              ));

@SELECTED = qw(LOCAL);

@OUTPUTFORMAT = ( 'latex' => '', 'xml' => '' );
